package com.algebra.active.aop;

import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

/**
 * @author al
 * @date 2020/6/10 8:56
 * @description
 */
@Component
@Slf4j
public class MyExecutionListener implements ExecutionListener {
    @Override
    public void notify(DelegateExecution execution) throws Exception {
        String eventName = execution.getEventName();
        if("take".equals(eventName)){
            log.info("[-指定节点提交-] take事件触发 ------->");


        } else if("start".equals(eventName)){
            log.info("[-指定节点提交-] start事件触发 ------->");

        } else if("end".equals(eventName)){
            log.info("[-指定节点提交-] end事件触发 ------->");

        }
    }
}
